import http from './request.js'
import ENV_CONFIG from '@/env.js'
import { getStorageSync } from '../utils/utils.js'
/* ---------------- 平台请求相关接口 start ---------------- */


const HCAPI = ENV_CONFIG.CONMON_SERVER_URL + '/hcapi'

// 单文件上传
export const ftupload = (filePath)=>{
	return new Promise((resolve,reject)=>{
		uni.uploadFile({
			url: HCAPI + '/system/file/put-file',
			filePath,
			method: 'post',
			name: 'file',
			header: {},
		}).then(res=>{
			resolve(JSON.parse(res.data))
		}).catch(err=>{
			reject(err)
		})
	})
}

